<ion-view view-title="积分账户">
    <ion-content class="account" overflow-scroll="true">
        <div class="card" style="margin-top: 0;">
			<div class="tabs-striped tabs-top tabs-background-positive tabs-color-light">
		      	<div class="tabs" style="top: 0; background-color: #fff; border-color: #fff; height: .4rem;border-width: 1px !important;">
					<a class="tab-item accounttab active" ng-click="change(this)"
						id="redpacket" data-tab="1" style="line-height: .36rem;">红包积分</a>
					<a class="tab-item accounttab " ng-click="change(this)" 
						id="interests" data-tab="2" style="line-height: .36rem;">股权积分</a>
					<a class="tab-item accounttab " ng-click="change(this)" 
						id="bonus" data-tab="3" style="line-height: .36rem;">红利积分</a>
				</div>
			</div>
		</div>
        <div class="memberinfo" style="margin-top:.5rem;">
        		<div class="item item-divider top">
                <span>{{account.name}}积分</span>
                <!--<div style="display: inline-block;">
                		<button ng-if="'1' == account.type"
                			ng-click="torechargeredpacket()"
                			class="button button-outline button-energized" 
                			style="display: inline-block; float: right; 
                				right: 10px; position: absolute; top: 5px;
						    height: .24rem; padding: 0 10px; line-height: .12rem;
						    min-height: .2rem; border-radius: 10px;">
						    {{account.name}}充值
				    </button>
                </div>-->
            </div>
            <div class="item tabs" style="height: 1rem; border-right: 0px;border-bottom-width: 0">
                <a class="tab-item" href="" style="margin-top: .2rem;">
                    <h2 style="color:#f69c00;font-size: 28px;">{{account.amount}}</h2>
                    <span>{{account.name}}积分</span>
                </a>
            </div>
            <div class="" ng-if="'1' == account.type && member.memberlevel == '03'" 
            		style="border-right: 0px;height: .5rem;padding-top: .05rem; background: #fff;">
                <div class="" style="width: 100%;text-align: center;">
                		<button ng-click="torechargeredpacket()"
                			class="button button-outline button-energized" 
                			style="display: inline-block; margin: 0 .05rem;
						    height: .24rem; padding: 0 10px; line-height: .12rem;
						    min-height: .2rem; border-radius: 10px;">
						    {{account.name}}充值
				    </button>
				    <button ng-click="toschedule()"
                			class="button button-outline button-energized" 
                			style="display: inline-block; margin: 0 .05rem;
						    height: .24rem; padding: 0 10px; line-height: .12rem;
						    min-height: .2rem; border-radius: 10px;">
						    充值进度查询
				    </button>
                </div>
            </div>
        </div>
        <div class="card">
            <div class="item item-divider top">
                收支记录
            </div>
            <div class="item tarjectory">
            		<div class="row title" style="font-size:.16rem;">
            			<div class="col-25" style="text-align: center; padding:.1rem 0;">时间</div>
            			<div class="col-25" style="text-align: center; padding:.1rem 0;">收支</div>
            			<div class="col-25" style="text-align: center; padding:.1rem 0;">金额</div>
            			<div class="col-25" style="text-align: center; padding:.1rem 0;">对方会员</div>
            		</div>
            		<div class="row content" ng-repeat="item in account.tarjectory"  ng-click="toviewdetaile(item)">
            			<div class="col-25" style="text-align: center; border-top:solid 0.01rem #ddd; padding:0.1rem 0 0.1rem 0;">{{item.traildate}}</div>
            			<div class="col-25" style="text-align: center; border-top:solid 0.01rem #ddd; padding:0.1rem 0 0.1rem 0;">{{"1" == item.inexflag ? "收入" : "支出"}}</div>
            			<div class="col-25" style="text-align: center; border-top:solid 0.01rem #ddd; padding:0.1rem 0 0.1rem 0;">{{item.amount}}</div>
            			<div class="col-25" style="text-align: center; border-top:solid 0.01rem #ddd; padding:0.1rem 0 0.1rem 0;">{{item.othmember}}</div>
            		</div>
            </div>
        </div>
    </ion-content>
</ion-view>

<script id="viewaccountdetail.html" type="text/ng-template">
	<ion-view view-title="账单详情">
	
    <ion-header-bar align-title="left" class="bar-positive">
		<button ng-click="closeviewaccountdetail()" class="button back-button buttons button-clear header-item" style="">
			<i class="icon ion-ios-arrow-back"></i> 
			<span class="back-text" style="transform: translate3d(0px, 0px, 0px);">
				<span class="default-title hide">账单详情</span>
				<span class="previous-title">账单详情</span>
			</span>
		</button>
		<h1 class="title" style="left: 0; text-align: center;"></h1>
	</ion-header-bar>
    <ion-content  class="writeback">
        <div style="padding-top: 20px; text-align: center;">
        		
            <img ng-src="{{fileurl + member.gragh}}" style="border: 1px solid #f69c00;border-radius: 35px;width: 70px; height: 70px;"/>
            <div class="nickname" style="margin: 10px auto 30px;">{{member.membername}}</div>
            <div class="row" style="color:#666">
            		<div class="col">
            			<label>{{detail.beamount}}</label>
            			<p style="margin: .2rem auto .3rem auto;">变化前金额</p>
            		</div>
            		<div class="col" style="padding-top:0px">
            			<label style="color:red; font-size:.16rem;font-weight: bold;">{{"1" == detail.inexflag ? "" : "-"}}{{detail.amount}}</label>
            			<p style="margin: .2rem auto .3rem auto;color:red; font-size:.18rem;font-weight: bold;">交易金额</p>
            		</div>
            		<div class="col">
            			<label>{{detail.afamount}}</label>
            			<p style="margin: .2rem auto .3rem auto;">变化后金额</p>
            		</div>
            </div>
		</div>
            <div class="list" style="margin-bottom: 0;">
	            <div class="item" style="padding: .1rem; border-color: #FFF;">交易类型
					<span class="item-note">{{detail.trajectorytype}}</span>
				</div>
	            <div class="item" style="padding: .1rem; border-color: #FFF;">对方账户
					<span class="item-note">{{detail.othmember}}</span>
				</div>
	            <div class="item" style="padding: .1rem; border-top-color: #FFF;">收支类型
					<span class="item-note">{{"1" == detail.inexflag ? "收入" : "支出"}}</span>
				</div>
            </div>
            <div class="list">
	            <div class="item" style="padding: .1rem; border-bottom-color: #FFF;border-top-color: #fff;">创建时间
					<span class="item-note">{{detail.traildate}}</span>
				</div>
	            <!--<div class="item" style="padding: .1rem; border-color: #FFF;">订单号
					<span class="item-note">{{detail.trajectorykey}}</span>
				</div>-->
            </div>
            <div class="list">
	            <div class="item" style="padding: .1rem; border-color: #FFF;">备注
					<span class="item-note">{{detail.remark}}</span>
				</div>
            </div>
    </ion-content>
</ion-view>
</script>
